package com.tan.kotlintest.activity

import android.content.Intent
import android.view.View
import com.tan.kotlintest.R
import com.tan.kotlintest.base.BaseActivity
import kotlinx.android.synthetic.main.activity_test_send_whole_broad_cast_layout.*

/**
 * 测试发送全局广播
 * 别的app是否能收到
 *
 */
class TestSendWholeBroadcastActivity : BaseActivity() {

    override fun getContentView(): View? {
        return inflate(R.layout.activity_test_send_whole_broad_cast_layout)
    }

    override fun onContentAdded() {
        title = "测试发送全局广播"
        send_bt.setOnClickListener {
            val intent = Intent(FROM_OUT_APP_ACTION)
            sendBroadcast(intent)
        }
    }

    companion object {
        private const val FROM_OUT_APP_ACTION = "from_out_app_action"
    }


}